package com.ruoyi.scrb;

import com.ruoyi.scrb.domain.ScrbCl;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;

/**
 * @class describe:
 * @anthor yellow QQ:736396212
 * @time 2022-12-12 8:51
 * @change
 * @change time
 */

public class test {
    public static void main(String[] args) {

        //测试取生产日报数据
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DAY_OF_MONTH, -1);
        String date = new SimpleDateFormat("yyyy-MM-dd").format(c.getTime());
        System.out.println(date);
        //String fileUrl = "\\\\192.168.1.89\\bbxt\\scrb\\CLGreen.xls";
        //File templateFile = new File(fileUrl);
        //InputStream is = null;
        //HSSFWorkbook workbook = null;
        //HSSFSheet sheet = null;
        //try {
        //    is = new FileInputStream(templateFile);// 将excel文件转为输入流
        //    workbook = new HSSFWorkbook(is);// 创建个workbook，
        //    // 获取第一个sheet
        //    sheet = workbook.getSheetAt(0);
        //    ScrbCl scrbCl =new ScrbCl();
        //    //scrbCl.setcDate(date);
        //
        //    //全焦
        //    scrbCl.setcLjgxQjDrSj(sheet.getRow(8).getCell(5).toString());
        //    scrbCl.setcLjgxQjLjSj(sheet.getRow(8).getCell(7).toString());
        //    //冶金焦
        //    scrbCl.setcLjgxYjjDrSj(sheet.getRow(9).getCell(5).toString());
        //    scrbCl.setcLjgxYjjLjSj(sheet.getRow(9).getCell(7).toString());
        //    //煤焦油
        //    scrbCl.setcLjgxMjyDrSj(sheet.getRow(10).getCell(5).toString());
        //    scrbCl.setcLjgxMjyLjSj(sheet.getRow(10).getCell(7).toString());
        //    //硫酸铵
        //    scrbCl.setcLjgxLsaDrSj(sheet.getRow(11).getCell(5).toString());
        //    scrbCl.setcLjgxLsaLjSj(sheet.getRow(11).getCell(7).toString());
        //    //轻苯
        //    scrbCl.setcLjgxQbDrSj(sheet.getRow(12).getCell(5).toString());
        //    scrbCl.setcLjgxQbLjSj(sheet.getRow(12).getCell(7).toString());
        //    //1#回转窑
        //    scrbCl.setcQyjgxHzy1DrSj(sheet.getRow(42).getCell(5).toString());
        //    scrbCl.setcQyjgxHzy1LjSj(sheet.getRow(42).getCell(7).toString());
        //    //2#回转窑
        //    scrbCl.setcQyjgxHzy2DrSj(sheet.getRow(19).getCell(5).toString());
        //    scrbCl.setcQyjgxHzy2LjSj(sheet.getRow(19).getCell(7).toString());
        //
        //
        //    System.out.println(scrbCl);
        //    System.out.println(sheet.getRow(11).getCell(5).toString());
        //    System.out.println(sheet.getRow(11).getCell(7).toString());
        //
        //} catch (Exception e1) {
        //    e1.printStackTrace();
        //}
    }


}
